package com.microservice.wechat.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.microservice.wechat.entity.WechatConfig;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 微信配置Mapper接口
 */
@Mapper
public interface WechatConfigMapper extends BaseMapper<WechatConfig> {

    /**
     * 查询所有启用的公众号配置的biz列表
     * 
     * @return biz列表
     */
    @Select("SELECT account_name FROM wechat_config " +
            "WHERE is_enabled = 1 " +
            "AND biz IS NOT NULL AND biz != ''")
    List<String> getEnabledBizList();
}
